﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shop.Core.Domain.Catalog;
using Shop.Core.Domain.Common;

namespace Shop.Core.Test
{
    public class ProductHelper
    {
        public static Product CreateProduct()
        {
            Product p = Factory.CreateProduct();
            p.AvailableEndDateTime = DateTime.UtcNow;
            p.AvailableStartDateTime = DateTime.UtcNow;
            p.CostPrise = new Money(20);
            p.Deleted = false;
            p.Description = "测试数据";
            p.DisplayStockQuantity = true;
            p.FullDescription = "测试数据，全文描述";
            p.Gtin = "Gtin";
            p.Height = new Lenght(10);
            p.IsFreeShipping = true;
            p.IsShipEnabled = true;
            p.Length = new Lenght(20, LenghtUnit.MM);
            p.ListPrice = new Money(40);
            p.ManageInventoryMethod = ManageInventoryMethod.ManageStock;
            //p.Manufacturer = new Manufacturer()
            //{
            //    CreatedOn = DateTime.UtcNow,
            //    Description="库存",

            //};
            p.MetaDescription = "元数据描述";
            p.MetaKeywords = "key words";
            p.MetaTitle = "title";
            p.ModifiedOn = DateTime.UtcNow;
            p.Name = "测试商品";
            p.Weight = new Mass(100, MassUnit.G);
            p.Price = new Money(30);
            return p;
        }
    }
}
